Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hl] Fix debug assigns not sorted when not optimize #12006

Merged

Conversation

yuxiaomao
Copy link
Contributor

@yuxiaomao yuxiaomao commented Feb 12, 2025

When the optimization is effective, fun.assigns are sorted correctly in ascending order. When no optimization or optimization is not needed in a inner function, arg (-1) seems to be placed before captured var (-2), which cause debugger not treating them correctly.

let new_assigns = List.sort (fun (_,p1) (_,p2) -> p1 - p2) (List.rev new_assigns) in
assigns := Array.of_list new_assigns;

Tests in

@yuxiaomao yuxiaomao merged commit 2833046 into HaxeFoundation:development Feb 13, 2025
59 checks passed
@yuxiaomao yuxiaomao deleted the dev-hldebug-sortassign branch February 13, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant